package com.duowan.realtime.common.base;


import static junit.framework.Assert.assertNotNull;

import javax.sql.DataSource;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.TestExecutionListeners;
//import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;

@ContextConfiguration(locations={"classpath:/spring/*.xml"
})
@TestExecutionListeners() 
public class BaseDaoTestCase4DB extends AbstractTransactionalJUnit4SpringContextTests  {

	protected DataSource dataSource;
	protected DataSource getDataSource() {
		return dataSource;
	}
	
	@Autowired(required=true)
	@Qualifier("verticaDataSource")
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
		super.setDataSource(dataSource);
	}
	
	@Test
	public void test() {
		assertNotNull(dataSource);
	}

}
